package com.tengju.user.domain.model.archive.resume;

import com.fasterxml.jackson.annotation.JsonValue;

public enum BankCardStatus {

    ENABLE("enable", "启用"),
    UNLINK("unlink", "解绑"),
    ;

    private String val;
    private String desc;

    BankCardStatus(String val, String desc) {
        this.val = val;
        this.desc = desc;
    }

    @JsonValue
    public String getVal() {
        return val;
    }

    public String getDesc() {
        return desc;
    }

    public static BankCardStatus form(String val) {
        BankCardStatus bankCardStatus = null;
        for (BankCardStatus bankCardStatu : BankCardStatus.values()) {
            if (bankCardStatu.val.equalsIgnoreCase(val)) {
                bankCardStatus = bankCardStatu;
            }
        }
        return bankCardStatus;
    }
}
